#include<iostream>
#include<map>
#include<set>
#include<vector>
#include<algorithm>
using namespace std;
  



struct cmp1
{
	bool operator()(const pair<string, int>& x1, const pair<string, int>& x2)const
	{
		return x1.second < x2.second;
	}
};

struct cmp2
{
	bool operator<(const pair<string, int>& x1, const pair<string, int>& x2)const
	{
		return x1.second < x2.second;
	}
};

bool compare(const pair<string, int>& x1, const pair<string, int>& x2)
{
	return x1.second < x2.second;
}



int main()
{
	map<string, int> mp;
	mp.insert({ "adfs", 4 });
	mp.insert({ "cghsdf", 3 });
	mp.insert({ "sdas", 2 });
	mp.insert({ "uiioo", 1 });
	vector<pair<string, int>> v(mp.begin(), mp.end());
	sort(v.begin(), v.end(), compare);
	for (auto e : v)
		cout << e.second << endl;
	return 0;
}